<template>
	<view class="page">
		<view class="head">
			<view class="title">
				在线支付
			</view>
			<view class="price">
				¥588.00
			</view>
		</view>
		<!-- 支付方式列表 -->
		<view class="pay-way">
			<view class="pay-list">
				<view class="list" v-for="(item,index) in payList" @click.stop="onPayWay(item,index)" :key="index">
					<view class="pay-type">
						<image :src="item.icon" mode=""></image>
						<text>{{item.name}}</text>
					</view>
					<view class="check">
						<radio value="" :checked="payWay === index ? true : false" color="red" />
					</view>
				</view>
			</view>
		</view>
		<view class="pay-submit">
			<view class="submit" @click="onSubmit">支付</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				payWay: 0,
				payList: [{
					icon: '../../static/wx_pay.png',
					name: '微信支付',
				}, {
					icon: '../../static/zfb_pay.png',
					name: '支付宝支付',
				}, {
					icon: '../../static/yue_pay.png',
					name: '余额支付',
				}, ],
			}
		},
		methods: {
			// 支付方式切换点击
			onPayWay(item, index) {
				this.payWay = index;
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import 'shengchengfangan.scss';
</style>
